﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace NJL.WebUsers.Controls
{
    public partial class WUEnterPriseSpaceLeftTravel : BaseUserControl
    {
        NJL.BLL.NJL_NEWS bllNews = new BLL.NJL_NEWS();
        NJL.BLL.NJL_COMPANY_SERVICE bllService = new BLL.NJL_COMPANY_SERVICE();
        NJL.Model.NJL_COMPANY_SERVICE modelService;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                modelService = bllService.GetModel(Request.QueryString["sid"]);
                if (modelService.TAG != null)
                {
                    DataSet ds = bllNews.GetList(4, "NEWS_TAG='" + modelService.TAG + "' and NJL_SYS_BASE_ID='"+WEBSITE_CODE+"'", "VISIT_COUNT desc,CREATE_DATE_TIME desc");
                    rptTravel.DataSource = ds;
                    rptTravel.DataBind();
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        youji.Visible = false;
                    }
                }
               
            }
        }
    }
}